#ifndef  _PICDEAL_H_
#define  _PICDEAL_H_
#include "include.h"

#define  PI   3.14


extern uint16 CenterLine[CAMERA_H];
extern uint16 CenterColumn[CAMERA_W];
extern uint16 temp1line[CAMERA_W],temp1column[CAMERA_W];
extern uint16 temp2line[CAMERA_W],temp2column[CAMERA_W];	
extern double k1;
extern double b1;
extern double k2;
extern double b2;
extern int16  pointcolumn;
extern int16  pointline;
extern uint8  F,B,L,R;
extern uint16  M,N;
extern uint16  last_Rol_Pos;
extern uint16  last_Pit_Pos;
extern uint16  last_yaw_Pos;

void findLine(uint8_t (* image)[Image_Width]);
void findColumn(uint8_t (* image)[Image_Width]);
void point(void);
void direction(void);
uint8_t CalculateThreshold(uint8_t (* image)[Image_Width], uint16_t widthBottom, uint16_t heightBottom, uint16_t widthTop, uint16_t heightTop);
void ImgBinarization(uint8_t widthBottom, uint8_t heightBottom, uint8_t widthTop, uint8_t heightTop);
void Picdeal(uint8_t (* image)[Image_Width]);
extern void SmoothMedian(unsigned char *pImageData, int nWidth, int nHeight, int nWidthStep);

#endif

